﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IHISCETeim.DAL;
using IHISCETeim.Model;
using IHISCETeim.Library;
using System.Data;

namespace IHISCETeim.BLL
{
    public class FTradeWarehouseFeeController
    {
        public static int Add(FTradeWarehouseFeeInfo obj)
        {
            return FTradeWarehouseFeeDAL.Add(obj);
        }
        public static bool Delete(int ID)
        {
            return FTradeWarehouseFeeDAL.Delete(ID);
        }
        public static FTradeWarehouseFeeInfo GetList(int ID)
        {
            FTradeWarehouseFeeInfo obj = CBO.FillObject<FTradeWarehouseFeeInfo>(FTradeWarehouseFeeDAL.GetList(ID));
            if (obj == null)
                obj = new FTradeWarehouseFeeInfo() { JinE=100,XingHao="" };
            return obj;
        }
        public static DataTable GetPagination(string whereSql, int PageIndex, int PageSize, string Sort, ref int TotalCount)
        {
            return FTradeWarehouseFeeDAL.GetPagination(whereSql, PageIndex, PageSize, Sort, ref TotalCount);
        }
        public static bool Update(FTradeWarehouseFeeInfo obj)
        {
            return FTradeWarehouseFeeDAL.Update(obj);
        }

        /// <summary>
        /// 定时执行同步,如果应收帐款有相应的记录，则把相应入库检查费添加到维保费，同时更新实现销售时间
        /// </summary>
        /// <returns></returns>
        public static bool ExecSync()
        {
            return FTradeWarehouseFeeDAL.ExecSync();
        }
     }
}
